LiveQuery.GroupBy(Func) method¶
Defined in
Type: LiveQueryReactiveList.Reactive.Queries Assembly: ReactiveList.Reactive.dll
Applies to
net11.0, net10.0, net47, net471, net472, net48, net481
Overloads¶
public GroupedLiveQuery<TKey, T> GroupBy<TKey>(Func<T, TKey> keySelector) where TKey : notnullpublic GroupedLiveQuery<TKey, TElement> GroupBy<TKey, TElement>(Func<T, TKey> keySelector, Func<T, TElement> elementSelector) where TKey : notnull where TElement : notnull
1. Overload¶
public GroupedLiveQuery<TKey, T> GroupBy<TKey>(Func<T, TKey> keySelector) where TKey : notnull
View source (opens in a new tab)
Summary: Groups the items by a key.
Type parameters
| Name | Description |
|---|---|
TKey | The grouping key type. |
Parameters
| Name | Type | Description |
|---|---|---|
keySelector | Func | Takes the grouping key from an item. |
Returns: GroupedLiveQuery
2. Overload¶
public GroupedLiveQuery<TKey, TElement> GroupBy<TKey, TElement>(Func<T, TKey> keySelector, Func<T, TElement> elementSelector) where TKey : notnull where TElement : notnull
View source (opens in a new tab)
Summary: Groups the items by a key and holds a value taken from each item in the groups.
Type parameters
| Name | Description |
|---|---|
TKey | The grouping key type. |
TElement | The type of the values the groups hold. |
Parameters
| Name | Type | Description |
|---|---|---|
keySelector | Func | Takes the grouping key from an item. |
elementSelector | Func | Takes the value a group holds from an item. |
Returns: GroupedLiveQuery